<template>
  <!-- 表格勾选完毕之后的批量处理 -->
  <div class="tips-box" style="">
    <p class="lt">
      <i class="el-icon-warning" />
      <span style="font-size: 14px;">已选择<em>{{ num }}</em>项目</span>
    </p>
    <p class="rt">
      <em v-if="startShow" @click="batchStart">批量开启</em>
      <em v-if="pauseShow" @click="batchPause">批量暂停</em>
      <em v-if="delShow" @click="batchDel">批量移除</em>
      <slot />
    </p>
  </div>
</template>

<script>
export default {
  props: {
    num: {
      default: 0,
      type: Number
    },
    startShow: {
      default: true,
      type: Boolean
    },
    pauseShow: {
      default: true,
      type: Boolean
    },
    delShow: {
      default: true,
      type: Boolean
    }
  },
  data() {
    return {}
  },
  methods: {
    batchStart() {
      this.$emit('batchStart')
    },
    batchPause() {
      this.$emit('batchPause')
    },
    batchDel() {
      this.$emit('batchDel')
    }

  }
}
</script>

<style lang="scss" scoped="true">
  @import '~@/styles/variables.scss';

  .tips-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(36, 190, 190, 0.1);

    border: 1px solid $mainColor1;
    height: 40px;
    border-radius: 2px;
    padding-left: 20px;

    p {
      font-size: 14px;
      display: flex;
      align-items: center;

      i {
        color: $mainColor1;
        font-size: 20px;
        margin-right: 16px;
      }

      em {
        // font-size: ;
        padding: 0 6px;
      }
    }

    .rt em {
      font-size: 14px;
      margin-left: 30px;
      cursor: pointer;
    }

  }

  em {
    color: $mainColor1;
    font-size: 14px;
  }
</style>
